Optimal. Leaf size=124 \[ \frac {1}{2} a x \left (a^2 B+6 a b C+6 b^2 B\right )+\frac {a^2 (a C+2 b B) \sin (c+d x)}{d}-\frac {b^2 (a B-2 b C) \tan (c+d x)}{2 d}+\frac {b^2 (3 a C+b B) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a B \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.40, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {4072, 4025, 4076, 4047, 8, 4045, 3770} \[ \frac {1}{2} a x \left (a^2 B+6 a b C+6 b^2 B\right )+\frac {a^2 (a C+2 b B) \sin (c+d x)}{d}-\frac {b^2 (a B-2 b C) \tan (c+d x)}{2 d}+\frac {b^2 (3 a C+b B) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a B \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3770
Rule 4025
Rule 4045
Rule 4047
Rule 4072
Rule 4076
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos ^2(c+d x) (a+b \sec (c+d x))^3 (B+C \sec (c+d x)) \, dx\\ &=\frac {a B \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) (a+b \sec (c+d x)) \left (-2 a (2 b B+a C)-\left (a^2 B+2 b^2 B+4 a b C\right ) \sec (c+d x)+b (a B-2 b C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a B \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (a B-2 b C) \tan (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) \left (-2 a^2 (2 b B+a C)-a \left (a^2 B+6 b^2 B+6 a b C\right ) \sec (c+d x)-2 b^2 (b B+3 a C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a B \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (a B-2 b C) \tan (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) \left (-2 a^2 (2 b B+a C)-2 b^2 (b B+3 a C) \sec ^2(c+d x)\right ) \, dx+\frac {1}{2} \left (a \left (a^2 B+6 b^2 B+6 a b C\right )\right ) \int 1 \, dx\\ &=\frac {1}{2} a \left (a^2 B+6 b^2 B+6 a b C\right ) x+\frac {a^2 (2 b B+a C) \sin (c+d x)}{d}+\frac {a B \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (a B-2 b C) \tan (c+d x)}{2 d}+\left (b^2 (b B+3 a C)\right ) \int \sec (c+d x) \, dx\\ &=\frac {1}{2} a \left (a^2 B+6 b^2 B+6 a b C\right ) x+\frac {b^2 (b B+3 a C) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a^2 (2 b B+a C) \sin (c+d x)}{d}+\frac {a B \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (a B-2 b C) \tan (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.22, size = 217, normalized size = 1.75 \[ \frac {a^3 B \sin (2 (c+d x))+2 a (c+d x) \left (a^2 B+6 a b C+6 b^2 B\right )+4 a^2 (a C+3 b B) \sin (c+d x)-4 b^2 (3 a C+b B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 b^2 (3 a C+b B) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+\frac {4 b^3 C \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+\frac {4 b^3 C \sin \left (\frac {1}{2} (c+d x)\right )}{\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )}}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.81, size = 152, normalized size = 1.23 \[ \frac {{\left (B a^{3} + 6 \, C a^{2} b + 6 \, B a b^{2}\right )} d x \cos \left (d x + c\right ) + {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (B a^{3} \cos \left (d x + c\right )^{2} + 2 \, C b^{3} + 2 \, {\left (C a^{3} + 3 \, B a^{2} b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.34, size = 234, normalized size = 1.89 \[ -\frac {\frac {4 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - {\left (B a^{3} + 6 \, C a^{2} b + 6 \, B a b^{2}\right )} {\left (d x + c\right )} - 2 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + 2 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.85, size = 168, normalized size = 1.35 \[ \frac {a^{3} B \sin \left (d x +c \right ) \cos \left (d x +c \right )}{2 d}+\frac {a^{3} B x}{2}+\frac {a^{3} B c}{2 d}+\frac {a^{3} C \sin \left (d x +c \right )}{d}+\frac {3 a^{2} b B \sin \left (d x +c \right )}{d}+3 C x \,a^{2} b +\frac {3 C \,a^{2} b c}{d}+3 B x a \,b^{2}+\frac {3 B a \,b^{2} c}{d}+\frac {3 C a \,b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {b^{3} B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {b^{3} C \tan \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 144, normalized size = 1.16 \[ \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} + 12 \, {\left (d x + c\right )} C a^{2} b + 12 \, {\left (d x + c\right )} B a b^{2} + 6 \, C a b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, B b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, C a^{3} \sin \left (d x + c\right ) + 12 \, B a^{2} b \sin \left (d x + c\right ) + 4 \, C b^{3} \tan \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.76, size = 236, normalized size = 1.90 \[ \frac {B\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-B\,b^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,2{}\mathrm {i}+6\,B\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+6\,C\,a^2\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-C\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,6{}\mathrm {i}}{d}+\frac {\frac {B\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{8}+\frac {C\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{2}+\frac {B\,a^3\,\sin \left (c+d\,x\right )}{8}+C\,b^3\,\sin \left (c+d\,x\right )+\frac {3\,B\,a^2\,b\,\sin \left (2\,c+2\,d\,x\right )}{2}}{d\,\cos \left (c+d\,x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________